﻿<UserControl
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:local="clr-namespace:Mengsk.ProxyDelivery.GoodsSpider.UI"
             x:Class="Mengsk.ProxyDelivery.GoodsSpider.UI.GoodsSpiderOneUC" 
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>

        <StackPanel Grid.Row="0" Orientation="Horizontal">
            <TextBlock Text="{Binding ThreadNumber, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:GoodsSpiderOneUC}}}" Margin="3" VerticalAlignment="Center"/>
            <TextBlock Name="tbIsRunning" Margin="3" VerticalAlignment="Center" Text="未运行"/>
            <TextBlock Name="tbDownloaded" Margin="3" VerticalAlignment="Center" Text="0"/>
            <TextBlock Text="/" Margin="3" VerticalAlignment="Center"/>
            <TextBlock Name="tbTotal" Margin="3" VerticalAlignment="Center" Text="{Binding Count, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:GoodsSpiderOneUC}}}"/>
            <TextBlock Name="tbError" Margin="3" VerticalAlignment="Center"/>
            <Button Name="btnViewError" Margin="3" Content="查看错误" Click="btnViewError_Click" Width="80"/>
        </StackPanel>
        <TextBox Grid.Row="1" x:Name="tbMessage" AcceptsReturn="True" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto"/>
        <ProgressBar Grid.Row="2" x:Name="pbProgress"  Value="0" Height="20" Maximum="1"/>
    </Grid>
</UserControl>
